@isTest
private class ObjectBatchOptControllerTest {
    static testMethod void testMethod1() {


    	  //客户1
        Account acc = TestUtils.createAccount();
        acc.Level__c = '三级甲等';
        acc.NCICCode__c = 'testAccount';

        insert acc;

        ObjectBatchOptController bc = new ObjectBatchOptController();

        bc.selectObjectName = 'Account';
        bc.selectObject();

        bc.searchJson = EncodingUtil.urlEncode('select Id ,Name from Account limit 1 ', 'UTF-8');

        bc.query();


        Map<String,Object> fieldMap = new Map<String,Object>();
        fieldMap.put('fieldName', 'Name');
        fieldMap.put('fieldType', 'string');
        List<Object> fl = new List<Object>{fieldMap};

        Map<String,Object> dataMap = new Map<String,Object>();
        dataMap.put('Id', acc.Id);
        dataMap.put('Name', 'testAccount11');
        List<Object> dl = new List<Object>{dataMap};
        Map<String,Object> data = new Map<String,Object>();
        data.put('field', fl);
        data.put('data', dl);

        bc.saveJson = EncodingUtil.urlEncode(JSON.serialize(data),'UTF-8');



        bc.save();
        bc.saveJson = EncodingUtil.urlEncode('[{"Id":"'+acc.Id+'"}]','UTF-8');
        bc.deleteData();


    }
}